package com.sitech.portal.system.dao.ibatis;

import java.util.HashMap;
import java.util.List;

import com.sitech.ibnms.core.BaseIbnmsDao;
import com.sitech.portal.system.dao.ISysUserShortcutDao;

public class SysUserShortcutDaoImpl extends BaseIbnmsDao implements ISysUserShortcutDao {

	public void add(HashMap map) {
		this.insert("insertForTB_SYS_USER_SHORTCUT", map);
	}

    public void insertShortcut(HashMap map) {
        this.insert("insertTB_SYS_USER_SHORTCUT", map);
    }

	public List findShortcutListByLoginID(String LOGIN_ID) {
		return this.query("findShortcutListByLoginID",
					LOGIN_ID);
	}

	public void update(HashMap map) {
		this.update("updateForTB_SYS_USER_SHORTCUT", map);
	}

	public void deleteForTB_SYS_USER_SHORTCUT(HashMap map) {
		this.delete("deleteForTB_SYS_USER_SHORTCUT", map);
	}

    public void deleteShortcutByPathAndLoginId(String shortcutPath, String loginId) {
        HashMap<String, String> params = new HashMap<String, String>();
        params.put("LOGIN_ID", loginId);
        params.put("SHORTCUT_PATH", shortcutPath);
        this.delete("deleteShortcutByPathAndLoginId", params);
    }
}
